package com.itljm.cxrMarket.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 订单表
 * @TableName orders
 */
@TableName(value ="orders")
@Data
public class Orders implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer orderId;
    private Long userId;//用户ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderTime;//订单生成时间
    private BigDecimal totalAmount;//订单总金额
    private Integer status;//订单状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;//订单更新时间
    private String paymentMethod;//支付方式
    private String deliveryAddress;//收货地址

    @TableField(exist = false)
    private String userName;//下单用户名

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}